import {
	post,
	get,
	del,
} from "@/utils/request.js"

export const childList = (data) => {
	return post('/api/child/list', data)
}
/**
 * 删除孩子档案
 */
export const delChild = (data) => {
	return del('/api/child/delete/' + data)
}

/**
 * 分享孩子档案
 */
export const shareChild = (data) => {
	return post('/api/release/shareChild', data)
}


/**
 * 添加共管状态
 * {
  "shareId": 0,
  "childList": [
    0
  ]
}
 */
export const addChildShare = (data) => {
	return post('/api/child/addShare', data)
}

/**
 * 解除共管状态
 * idList： id 数组
 */
export const receiveChildShare = (idList) => {
	var str = idList.join(",");
	console.log("receiveChildShare");
	return del("/api/child/relieveShare/" + str)
}